/**
 * @file   testTypeTraits.cpp
 * @author wolfhead <wolfhead@wolfhead-laptop>
 * @date   Wed Sep 14 10:31:04 2011
 * 
 * @brief  
 * 
 * 
 */
#include "gtest/gtest.h"
#include <acapella/traits/type_traits.hpp>

using namespace acapella::traits;

TEST(TypeTraitsTest, IsVoid)
{
/*
    EXPECT_EQ(true, TypeTraits<void>::isStdFundamental);
    EXPECT_EQ(true, TypeTraits<const void>::isStdFundamental);
    EXPECT_EQ(true, TypeTraits<volatile const void>::isStdFundamental);
*/
}

TEST(TypeTraitsTest, IsPointerTest)
{
    EXPECT_EQ(true, TypeTraits<void *>::isPointer);
    EXPECT_EQ(true, TypeTraits<char *>::isPointer);
    EXPECT_EQ(true, TypeTraits<const char *>::isPointer);
    EXPECT_EQ(false, bool(TypeTraits<char>::isPointer));
}

TEST(TypeTraitsTest, IsReferenceTest)
{
    EXPECT_EQ(true, TypeTraits<char&>::isReference);
    EXPECT_EQ(false, bool(TypeTraits<char>::isReference));
}

TEST(TypeTraitsTest, IsStdUnsignedIntTest)
{
    EXPECT_EQ(true, TypeTraits<unsigned char>::isStdUnsignedInt);
    EXPECT_EQ(true, TypeTraits<unsigned short>::isStdUnsignedInt);
    EXPECT_EQ(true, TypeTraits<unsigned int>::isStdUnsignedInt);
    EXPECT_EQ(true, TypeTraits<unsigned long>::isStdUnsignedInt);
    EXPECT_EQ(false, bool(TypeTraits<char&>::isStdUnsignedInt));
    EXPECT_EQ(false, bool(TypeTraits<char*>::isStdUnsignedInt));
}

TEST(TypeTraitsTest, IsStdSignedIntTest)
{
    EXPECT_EQ(true, TypeTraits<signed char>::isStdSignedInt);
    EXPECT_EQ(true, TypeTraits<short>::isStdSignedInt);
    EXPECT_EQ(true, TypeTraits<int>::isStdSignedInt);
    EXPECT_EQ(true, TypeTraits<long>::isStdSignedInt);
    EXPECT_EQ(false, bool(TypeTraits<char&>::isStdUnsignedInt));
    EXPECT_EQ(false, bool(TypeTraits<char*>::isStdUnsignedInt));
}

